Micron Document
Fox's Git Mirrors

Node / rns-mirrors / Reticulum-Go.git / files / pkg / debug / syslog_unix.go

Displaying Raw • Download

pkg/debug/syslog_unix.go 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 497 B

// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-2026 Quad4.io

//go:build unix && !linux && !haiku

package debug

import (
"fmt"
"io"
"log/syslog"
)

func openSyslogWriter(tag string) (io.Writer, error) {
if tag == "" {
tag = "reticulum-go"
}
w, err := syslog.New(syslog.LOG_DAEMON|syslog.LOG_INFO, tag)
if err != nil {
return nil, fmt.Errorf("syslog: %w", err)
}
return w, nil
}

func openJournaldWriter(tag string) (io.Writer, error) {
return openSyslogWriter(tag)
}

Served by rngit 1.5.2 - Generated in 0.02s